<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>付钱拉pcjssdk_示例</title>
    <script src="http://www.css88.com/jqapi-1.9/js/jquery.min.js"></script>
    <script src="https://lib.fuqian.la/pcjssdk.4.0.js"></script>
    <style>
        button { width: 200px; height: 35px; background-color: #000; border-radius: 5px; color: #fff; border: 0; margin: 15px;}
    </style>
</head>
<body>
    <p>备注：请把该文件放到静态服务器里访问。</p>
    <button id="test">付钱拉收银台</button>
    <button id="test2">微信扫码支付</button>
    <button id="test3">支付宝支付</button>
    <script>
        $('#test').on('click', function(){
            FUQIANLAPC.init({
                app_id: '3hmd5BArSIk87ELxUBXWFA', //应用ID号
                order_no: new Date().getTime(), //订单号，此处为模拟订单号。具体以接入为准
                channel: 'ali_direct_pay_pc,wx_pay_pub_scan,bd_direct_pay_pc,jd_pay_pc', //开通的通道简称
                amount: '1', //支付金额
                subject: 'pc收银台测试数据', //商品标题
                notify_url: 'http://fuqian.la', //异步支付结果通知地址
                extra: {
                    jd_pay_pc: {
                        return_url: 'http://fuqian.la'
                    }
                }
            });
        });
        $('#test2').on('click', function(){
            var charge = {
                    app_id: '3hmd5BArSIk87ELxUBXWFA',
                    order_no: new Date().getTime(),
                    amount: '1',
                    channel: 'wx_pay_pub_scan',
                    subject: '微信扫码自定义签名',
                    version: 'v2.1.1',
                    notify_url: 'http://fuqian.la'
                };
                    
            FUQIANLAPC.init({
                isCashierDesk: false,
                app_id: charge.app_id,
                order_no: charge.order_no, //订单号，
                channel: charge.channel,
                amount: charge.amount,
                subject: charge.subject,
                notify_url: charge.notify_url,
            });
});
        $('#test3').on('click', function(){
            var charge = {
                    app_id: '3hmd5BArSIk87ELxUBXWFA',
                    order_no: new Date().getTime(),
                    amount: '1',
                    channel: 'ali_direct_pay_pc',
                    subject: '支付宝pc测试',
                    version: 'v2.1.1',
                    notify_url: 'http://fuqian.la'
                };

            FUQIANLAPC.init({
                isCashierDesk: false,
                app_id: charge.app_id,
                order_no: charge.order_no, //订单号，
                channel: charge.channel,
                amount: charge.amount,
                subject: charge.subject,
                notify_url: charge.notify_url
            });
        });
    </script>
</body>
</html>